<?php
use Jialeo\LaravelSchemaExtend\Schema;
//use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopOrderInfosTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_order_infos', function (Blueprint $table) {
            $table->comment = '订单详情表';
            $table->increments('id')->comment('订单详情ID');
			$table->integer('order_id')->comment('订单id');
			$table->integer('product_id')->comment('商品id');
			$table->integer('specs_id')->comment('商品规格id');
			$table->string('specs',100)->nullable()->comment('已选规格内容');
			$table->tinyInteger('num')->comment('购买数量');
			$table->decimal('money',8,2)->default('0.00')->comment('产品售价');
			$table->decimal('postage',8,2)->default('0.00')->comment('邮费');
			$table->decimal('cost_money',8,2)->default('0.00')->comment('产品成本价');
            $table->timestamp('created_at')->nullable()->comment('创建时间');
			$table->timestamp('updated_at')->nullable()->comment('更新时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_order_infos');
    }
}
